package com.example.mysql.jpa.repository;


import com.example.mysql.jpa.domain.TestBean;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface TestRepository extends JpaRepository<TestBean, Integer>, CustomRepository
{
    @Transactional
    @Modifying
    @Query(value = "delete from test where id in ?1", nativeQuery = true)
    void deleteByIdIn(List<Integer> ids);
}
